from tkinter import*
x0=int(input("Координата x0 "))
y0=int(input("Координата y0 "))
n=int(input("Коэффициент "))
if n==0 and x0>=0 and y0>=0 and x0<=500 and y0<=500:
    pass
else:
    if n>0 and x0>=0 and y0>=0 and x0+30*n<=500 and y0+20*n<=500:
        pass
    else:
        print("Размер фигуры превышает")
        exit()
root=Tk()
root.geometry("500x500")
canvas=Canvas(bg="white",width=500,height=500)
canvas.pack(anchor=CENTER,expand=1)
canvas.create_polygon(x0,y0,x0+10*n,y0+0*n,x0+10*n,y0+10*n,x0+20*n,y0+10*n,x0+20*n,y0+0*n,x0+30*n,y0+0*n,x0+30*n,y0+20*n,x0+0*n,y0+20*n)
root.mainloop()
